package cn.yunhe.dao;

import cn.yunhe.model.Member;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/*spring注解*/
@Repository(value = "memberDao")
public interface MemberDao {
    /**
     * 总记录数
     * @param objectMap
     * @return
     */
    Integer getTotalRecords(Map<String, Object> objectMap);

    /**
     * 多条件查询的结果集:记录列表
     * @param objectMap
     * @return
     */
    List<Member> searchByConditions(Map<String, Object> objectMap);

    /**
     * 新增记录
     * @param member
     * @return
     */
    Integer insertRecord(Member member);

    /**
     * 删除记录
     * @param member
     * @return
     */
    Integer deleteRecord(Member member);

    /**
     * 跟新记录
     * @param member
     * @return
     */
    Integer updateRecord(Member member);

    /**
     *通过ID定位完整信息
     * @param member
     * @return
     */
    Member getById(Member member);

}
